﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace VikingArcade_v2._0
{
    public class InitializingUserInterface : UserInterface
    {
        private Panel background;
        protected override void InitializeControls()
        {
            base.InitializeControls();

            //------------------------------------------------------------------------
            //BackgroundPanel
            //------------------------------------------------------------------------

            background = new Panel();
            background.BackgroundTexture = GameContentManager.GetTexture("loadingScreen");
            background.Size = new Point(DisplayController.GraphicsDevice.PresentationParameters.BackBufferWidth,
                                        DisplayController.GraphicsDevice.PresentationParameters.BackBufferWidth*
                                        background.BackgroundTexture.Height/background.BackgroundTexture.Width);
            background.Position = new Point(0,
                                            (DisplayController.GraphicsDevice.PresentationParameters.BackBufferHeight -
                                             background.Size.Y)/2);
            background.Anchor = Anchor.StretchWidth;
            controls.Add(background);
        }
    }
}
